import javax.swing.filechooser.FileSystemView;
import java.io.*;
import java.util.Arrays;

public class FileInputStream {

    public static void main(String[] args) {
        System.out.println("文件----");

        FileSystemView fsv = FileSystemView.getFileSystemView();
        File[] fs = File.listRoots();
        for (int i = 0; i < fs.length; i++) {
            String name = fsv.getSystemDisplayName(fs[i]).toString();
            int begin = name.lastIndexOf("(");
            int end = name.lastIndexOf(")");
            name = name.substring(begin + 1, end);
            System.err.println(name);
            System.out.println(fsv.getSystemDisplayName(fs[i]));
        }
    }
}
